package com.mutual.assistance.user.model.vo;

import com.mutual.assistance.validation.ValidationGroups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

@Data
@ApiModel(value = "修改菜单资源", description = "修改菜单资源")
public class UpdateMenuVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "标识")
    @NotBlank(message = "菜单id不能为空", groups = ValidationGroups.Update.class)
    private String menuId;

    @ApiModelProperty(value = "菜单编码，例如：test")
    @NotBlank(message = "菜单编码不能为空", groups = ValidationGroups.Update.class)
    private String code;

    @ApiModelProperty(value = "父菜单ID")
    private String pId;

    @ApiModelProperty(value = "名称")
    private String menuName;

    @ApiModelProperty(value = "请求地址")
    private String url;

    @ApiModelProperty(value = "是否是菜单，1：是，2：不是")
    @Range(min = 1, max = 2, message = "只能填写1或者2")
    private Integer isMenu;

    @ApiModelProperty(value = "是否可用，1：可用，2：不可用")
    @Range(min = 1, max = 2, message = "只能填写1或者2")
    private Integer status;

    @ApiModelProperty(value = "菜单排序")
    @Range(min = 1, max = 10, message = "排序最大为10，最小为1, 数字越小优先级越高")
    private Integer sort;

    @ApiModelProperty(value = "菜单层级")
    @Range(min = 2, max = 3, message = "只能添加2级与3级的菜单")
    private Integer level;

}
